﻿#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

typedef double Real;


typedef struct
{
	int n;
}Context;
Context context = { 0 };


void read_data(Context* ctx)
{

}

void read_line(char* data)
{
	char c;
	while (scanf("%c", &c))
	{
		if (c == '.') {
			break;
		}
		*data++ = c;
	}
	*data = 0;
}

char* next(char* buf)
{
	while (*buf) {
		if(*buf== ' ')
			break;
		buf++;
	}
	*buf = 0;
	return buf;
}

void solve(Context* ctx)
{
	char buf[100000];
	read_line(buf);
	char* p0=buf;
	char* p1;
	int c = 0;
	while (*p0)
	{
		p1 = next(p0);
		int n = strlen(p0);
		if (n)
		{
			if (c++ > 0)
				printf(" ");
			printf("%d", n);
		}
		p0 = p1 + 1;
	}

	printf("\n");
}

int main()
{
	freopen("D:/Develop/GitRepos/MOOC/浙江大学/数据结构/201906/DataStructure/M2019秋C入门和进阶练习集/7-179.txt", "r", stdin);
	read_data(&context);
	solve(&context);
	return 0;
}
